<!-- 专家信息卡片组件 -->
<template>
  <view class="infoCard">
    <view class="disFlxCC px-15">
      <view class="pt-25">
        <u-image
          :src="item.headimg"
          width="180rpx"
          height="180rpx"
          mode="aspectFill"
          shape="circle"
        ></u-image>
      </view>
      <view class="fz-18 fw-7 pt-15">{{ item.userName || ''}}</view>
      <view class="py-20">
        <text>{{item.postName || ''}}</text>
        <text v-if="item.deptname" class="pl-15">{{ item.deptname}}</text>
        <text v-if="item.com" class="pl-15">{{ item.com}}</text>
      </view>
      <view class="disFlxAC pb-20" style="flex-wrap: wrap;">
        <view
          class="fz-12 tag ov-2"
          v-for="(tag, tagIndex) in splitRetuen(item.speciality)"
          :key="tagIndex"
        >
          {{ tag }}
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { splitRetuen } from "@/utils/common.js";

export default {
  props: {
    item: {
      type: Object,
      default: {},
    }
  },
  data() {
    return {};
  },

  methods: {
    splitRetuen
  },
};
</script>
<style lang='scss' scoped>
.infoCard {
  .tag {
    color: #808080;
    padding: 8rpx 18rpx;
    border-radius: 50rpx;
    text-align: center;
    font-size: 24rpx;
    background-color: #f5f5f5;
    margin-top: 10rpx;
  }
  .tag + .tag {
    margin-left: 16rpx;
  }
}
</style>